﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SMSROUTER
{
    public partial class FrmEditBase : Form
    {

        public delegate void OnChange();
        public event OnChange Change;
        
        public FrmEditBase()
        {
            InitializeComponent();
        }

        private void SaveChanges()
        {
            Save();
            if (Change != null)
                Change();
        }

        protected virtual void Save() { }

        private void btnOK_Click(object sender, EventArgs e)
        {
            SaveChanges();
            this.Close();
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
